<?php
/**
 * Truncate helper
 */
class App_View_Helper_LocationMenu extends Zend_View_Helper_Abstract
{
	public function locationMenu()
	{
		$cat = new Location_Model_Category();
		$categories = $cat->fetchParentCategories();

		$packLinks ="";
		foreach($categories as $category) {
			//print_r($val);
			$packLinks .= "<li><a href='" . $this->view->url(array(	'module'	=>'location',
																	'controller'=>'materiel-informatique',
																	'action'	=>'list',
																	'categoryid'	=>$category['id'],
																	't'			=> 'location ' . $category['title']))
			. "'>Location " . $category['title'] . " (" . $category['image'] . "&#8364;)</a></li>";
		}
		
		return $packLinks;
	}
}
